/*
 * ClientGUI.java
 *
 * Created on 14 novembre 2006, 07:08
 */

package noyau;



import javax.swing.JOptionPane;
import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContextExt;
import org.omg.CosNaming.NamingContextExtHelper;
import org.omg.CosNaming.NamingContextPackage.CannotProceed;
import org.omg.CosNaming.NamingContextPackage.NotFound;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;
import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
import org.omg.PortableServer.POAPackage.ServantNotActive;
import org.omg.PortableServer.POAPackage.WrongPolicy;
import projetCORBA.Banque;
import projetCORBA.BanqueHelper;
import projetCORBA.Garant;
import projetCORBA.GarantHelper;
import projetCORBA.MauvaisMotDePasse;
import projetCORBA.Participant;
import projetCORBA.ParticipantHelper;
import projetCORBA.Stock;
import projetCORBA.StockHelper;
import projetCORBA.UtilisateurDejaExistant;


/**
 *
 * @author  LIOdAT
 */
public class ClientGUI extends javax.swing.JFrame {
    
  public static ParticipantImplGUI utilisateurCourant;

	public static Garant garant;

	public static Banque banque;

	public static Stock stock;

	public static org.omg.CORBA.ORB orb;

	public static org.omg.CORBA.Object objRef;

	public static NamingContextExt ncRef;
    
    /** Creates new form ClientGUI */
    public ClientGUI() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                          
    private void initComponents() {
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanelConnexion = new javax.swing.JPanel();
        jPanelConnexionConnexion = new javax.swing.JPanel();
        jLabelIdentifiant = new javax.swing.JLabel();
        jLabelMdp = new javax.swing.JLabel();
        jButtonConnexion = new javax.swing.JButton();
        jTextFieldIdentifiant = new javax.swing.JTextField();
        jTextFieldMdp = new javax.swing.JTextField();
        jButtonDeconnexion = new javax.swing.JButton();
        jPanelConnexionInscription = new javax.swing.JPanel();
        jLabelUtilisateur = new javax.swing.JLabel();
        jButtonInscription = new javax.swing.JButton();
        jTextFieldUtilisateur = new javax.swing.JTextField();
        jLabelMdpG = new javax.swing.JLabel();
        jTextFieldMdpG = new javax.swing.JTextField();
        jButtonQuitter = new javax.swing.JButton();
        jPanelCompte = new javax.swing.JPanel();
        jLabelSoldeCourant = new javax.swing.JLabel();
        jTextFieldSoldeCourant = new javax.swing.JTextField();
        jLabelCrediter = new javax.swing.JLabel();
        jTextFieldCrediter = new javax.swing.JTextField();
        jButtonValiderCrediter = new javax.swing.JButton();
        jButtonMajSoldeCourant = new javax.swing.JButton();
        jPanelStock = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jListStock = new javax.swing.JList();
        jButtonMajStock = new javax.swing.JButton();
        jLabelAjouterProduit = new javax.swing.JLabel();
        jTextFieldAjouterProduit = new javax.swing.JTextField();
        jButtonValiderAjouterProduit = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jTextFieldStockDe = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jListStockDe = new javax.swing.JList();
        jButtonStockDe = new javax.swing.JButton();
        jButtonAjoutMonStock = new javax.swing.JButton();
        jButtonPasMonStock = new javax.swing.JButton();
        jPanelTransaction = new javax.swing.JPanel();
        jLabelPP = new javax.swing.JLabel();
        jLabelPA = new javax.swing.JLabel();
        jLabelPPPdt = new javax.swing.JLabel();
        jLabelPPCQ = new javax.swing.JLabel();
        jLabelPPAQ = new javax.swing.JLabel();
        jTextFieldPPPdt = new javax.swing.JTextField();
        jTextFieldPPCQ = new javax.swing.JTextField();
        jTextFieldPPAQ = new javax.swing.JTextField();
        jLabelPAPdt = new javax.swing.JLabel();
        jTextFieldPAPdt = new javax.swing.JTextField();
        jLabelPAC = new javax.swing.JLabel();
        jTextFieldPAC = new javax.swing.JTextField();
        jLabelPAAQ = new javax.swing.JLabel();
        jTextFieldPAAQ = new javax.swing.JTextField();
        jButtonValiderTPP = new javax.swing.JButton();
        jButtonValiderTPA = new javax.swing.JButton();
        jLabelTAP = new javax.swing.JLabel();
        jLabelAPPC = new javax.swing.JLabel();
        jLabelAPCQ = new javax.swing.JLabel();
        jLabelAPAQ = new javax.swing.JLabel();
        jTextFieldAPPC = new javax.swing.JTextField();
        jTextFieldAPCQ = new javax.swing.JTextField();
        jTextFieldAPAQ = new javax.swing.JTextField();
        jButtonValiderTAP = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jPanelConnexionConnexion.setBorder(javax.swing.BorderFactory.createTitledBorder("Connexion"));
        jLabelIdentifiant.setText("Identifiant");

        jLabelMdp.setText("Mot de passe");

        jButtonConnexion.setText("Connexion");
        jButtonConnexion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonConnexionActionPerformed(evt);
            }
        });

        jButtonDeconnexion.setText("D\u00e9connexion");

        org.jdesktop.layout.GroupLayout jPanelConnexionConnexionLayout = new org.jdesktop.layout.GroupLayout(jPanelConnexionConnexion);
        jPanelConnexionConnexion.setLayout(jPanelConnexionConnexionLayout);
        jPanelConnexionConnexionLayout.setHorizontalGroup(
            jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelConnexionConnexionLayout.createSequentialGroup()
                .add(32, 32, 32)
                .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabelIdentifiant, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabelMdp))
                .add(37, 37, 37)
                .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jTextFieldMdp)
                    .add(jTextFieldIdentifiant, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 23, Short.MAX_VALUE)
                .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jButtonConnexion, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jButtonDeconnexion, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelConnexionConnexionLayout.setVerticalGroup(
            jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelConnexionConnexionLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelIdentifiant)
                    .add(jTextFieldIdentifiant, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonDeconnexion))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 17, Short.MAX_VALUE)
                .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanelConnexionConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabelMdp)
                        .add(jTextFieldMdp, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jButtonConnexion))
                .addContainerGap())
        );

        jPanelConnexionInscription.setBorder(javax.swing.BorderFactory.createTitledBorder("Inscription"));
        jLabelUtilisateur.setText("Nom d'utilisateur");

        jButtonInscription.setText("Inscription");
        jButtonInscription.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonInscriptionActionPerformed(evt);
            }
        });

        jLabelMdpG.setText("Mot de passe");

        jTextFieldMdpG.setEditable(false);

        jButtonQuitter.setText("Quitter");

        org.jdesktop.layout.GroupLayout jPanelConnexionInscriptionLayout = new org.jdesktop.layout.GroupLayout(jPanelConnexionInscription);
        jPanelConnexionInscription.setLayout(jPanelConnexionInscriptionLayout);
        jPanelConnexionInscriptionLayout.setHorizontalGroup(
            jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelConnexionInscriptionLayout.createSequentialGroup()
                .add(32, 32, 32)
                .add(jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabelUtilisateur)
                    .add(jLabelMdpG))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 24, Short.MAX_VALUE)
                .add(jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTextFieldMdpG)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTextFieldUtilisateur, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))
                .add(25, 25, 25)
                .add(jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jButtonQuitter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jButtonInscription, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelConnexionInscriptionLayout.setVerticalGroup(
            jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelConnexionInscriptionLayout.createSequentialGroup()
                .add(jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jTextFieldUtilisateur, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabelUtilisateur)
                    .add(jButtonInscription))
                .add(20, 20, 20)
                .add(jPanelConnexionInscriptionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelMdpG)
                    .add(jTextFieldMdpG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonQuitter))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout jPanelConnexionLayout = new org.jdesktop.layout.GroupLayout(jPanelConnexion);
        jPanelConnexion.setLayout(jPanelConnexionLayout);
        jPanelConnexionLayout.setHorizontalGroup(
            jPanelConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelConnexionLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelConnexionInscription, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanelConnexionConnexion, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelConnexionLayout.setVerticalGroup(
            jPanelConnexionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelConnexionLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelConnexionConnexion, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelConnexionInscription, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jTabbedPane1.addTab("Connexion", jPanelConnexion);

        jLabelSoldeCourant.setText("solde courant");

        jLabelCrediter.setText("cr\u00e9diter");

        jButtonValiderCrediter.setText("valider");
        jButtonValiderCrediter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonValiderCrediterActionPerformed(evt);
            }
        });

        jButtonMajSoldeCourant.setText("mettre \u00e0 jour");
        jButtonMajSoldeCourant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonMajSoldeCourantActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanelCompteLayout = new org.jdesktop.layout.GroupLayout(jPanelCompte);
        jPanelCompte.setLayout(jPanelCompteLayout);
        jPanelCompteLayout.setHorizontalGroup(
            jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelCompteLayout.createSequentialGroup()
                .add(71, 71, 71)
                .add(jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabelSoldeCourant)
                    .add(jLabelCrediter))
                .add(19, 19, 19)
                .add(jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jTextFieldCrediter)
                    .add(jTextFieldSoldeCourant, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 102, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jButtonValiderCrediter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jButtonMajSoldeCourant))
                .addContainerGap(99, Short.MAX_VALUE))
        );
        jPanelCompteLayout.setVerticalGroup(
            jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelCompteLayout.createSequentialGroup()
                .add(86, 86, 86)
                .add(jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelSoldeCourant)
                    .add(jTextFieldSoldeCourant, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonMajSoldeCourant))
                .add(27, 27, 27)
                .add(jPanelCompteLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelCrediter)
                    .add(jTextFieldCrediter, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonValiderCrediter))
                .addContainerGap(100, Short.MAX_VALUE))
        );
        jTabbedPane1.addTab("Compte", jPanelCompte);

        jScrollPane1.setViewportView(jListStock);

        jButtonMajStock.setText("Mettre \u00e0 jour le stock");
        jButtonMajStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonMajStockActionPerformed(evt);
            }
        });

        jLabelAjouterProduit.setText("Ajouter produit");

        jButtonValiderAjouterProduit.setText("valider");
        jButtonValiderAjouterProduit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonValiderAjouterProduitActionPerformed(evt);
            }
        });

        jLabel14.setText("Consulter le stock de");

        jScrollPane2.setViewportView(jListStockDe);

        jButtonStockDe.setText("Mettre \u00e0 jour le stock");
        jButtonStockDe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStockDeActionPerformed(evt);
            }
        });

        jButtonAjoutMonStock.setText("ajout");
        jButtonAjoutMonStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAjoutMonStockActionPerformed(evt);
            }
        });
        
        
        jButtonPasMonStock.setText("ajout");
        jButtonPasMonStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAjoutPasMonStockActionPerformed(evt);
            }
        });
        
        
        org.jdesktop.layout.GroupLayout jPanelStockLayout = new org.jdesktop.layout.GroupLayout(jPanelStock);
        jPanelStock.setLayout(jPanelStockLayout);
        jPanelStockLayout.setHorizontalGroup(
            jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelStockLayout.createSequentialGroup()
                .add(160, 160, 160)
                .add(jButtonMajStock)
                .add(162, 162, 162))
            .add(jPanelStockLayout.createSequentialGroup()
                .add(74, 74, 74)
                .add(jLabelAjouterProduit)
                .add(19, 19, 19)
                .add(jTextFieldAjouterProduit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 122, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonValiderAjouterProduit)
                .addContainerGap(98, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelStockLayout.createSequentialGroup()
                .addContainerGap(68, Short.MAX_VALUE)
                .add(jLabel14)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jTextFieldStockDe, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonStockDe)
                .add(29, 29, 29))
            .add(jPanelStockLayout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 360, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonAjoutMonStock, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)
                .addContainerGap())
            .add(jPanelStockLayout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 361, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonPasMonStock, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelStockLayout.setVerticalGroup(
            jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelStockLayout.createSequentialGroup()
                .add(jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelStockLayout.createSequentialGroup()
                        .add(jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabelAjouterProduit)
                            .add(jTextFieldAjouterProduit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jButtonValiderAjouterProduit))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButtonMajStock)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanelStockLayout.createSequentialGroup()
                        .add(84, 84, 84)
                        .add(jButtonAjoutMonStock)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel14)
                    .add(jTextFieldStockDe, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonStockDe))
                .add(jPanelStockLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelStockLayout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanelStockLayout.createSequentialGroup()
                        .add(29, 29, 29)
                        .add(jButtonPasMonStock)))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jTabbedPane1.addTab("Stock", jPanelStock);

        jLabelPP.setText("Transaction (produit/produit)");

        jLabelPA.setText("Transaction (produit/argent)");

        jLabelPPPdt.setText("quel produit ?");

        jLabelPPCQ.setText("contre quoi ?");

        jLabelPPAQ.setText("avec qui ?");

        jLabelPAPdt.setText("quel produit ?");

        jLabelPAC.setText("contre combien ?");

        jLabelPAAQ.setText("avec qui ?");

        jButtonValiderTPP.setText("Valider Transaction (produit/produit)");
        jButtonValiderTPP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonValiderTPPActionPerformed(evt);
            }
        });

        jButtonValiderTPA.setText("Valider Transaction (produit/argent)");
        jButtonValiderTPA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonValiderTPAActionPerformed(evt);
            }
        });

        jLabelTAP.setText("Transaction (argent/produit)");

        jLabelAPPC.setText("paye combien ?");

        jLabelAPCQ.setText("contre quoi ?");

        jLabelAPAQ.setText("avec qui ?");

        jButtonValiderTAP.setText("Valider Transition (argent/produit)");
        jButtonValiderTAP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonValiderTAPActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanelTransactionLayout = new org.jdesktop.layout.GroupLayout(jPanelTransaction);
        jPanelTransaction.setLayout(jPanelTransactionLayout);
        jPanelTransactionLayout.setHorizontalGroup(
            jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelTransactionLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelTransactionLayout.createSequentialGroup()
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jLabelPP)
                            .add(jPanelTransactionLayout.createSequentialGroup()
                                .add(10, 10, 10)
                                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabelPPPdt)
                                    .add(jLabelPPCQ)
                                    .add(jLabelPPAQ))
                                .add(22, 22, 22)
                                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jTextFieldPPAQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(jTextFieldPPPdt, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)
                                        .add(jTextFieldPPCQ)))))
                        .add(27, 27, 27)
                        .add(jButtonValiderTPP))
                    .add(jPanelTransactionLayout.createSequentialGroup()
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jLabelPA)
                            .add(jPanelTransactionLayout.createSequentialGroup()
                                .add(10, 10, 10)
                                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jPanelTransactionLayout.createSequentialGroup()
                                        .add(jLabelPAPdt)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 21, Short.MAX_VALUE)
                                        .add(jTextFieldPAPdt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 88, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(jPanelTransactionLayout.createSequentialGroup()
                                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(jLabelPAC)
                                            .add(jLabelPAAQ))
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(jTextFieldPAAQ, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)
                                            .add(jTextFieldPAC, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE))))))
                        .add(41, 41, 41)
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelTAP)
                            .add(jPanelTransactionLayout.createSequentialGroup()
                                .add(10, 10, 10)
                                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabelAPPC)
                                    .add(jLabelAPCQ)
                                    .add(jLabelAPAQ))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                    .add(jTextFieldAPAQ)
                                    .add(jTextFieldAPCQ)
                                    .add(jTextFieldAPPC, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)))))
                    .add(jPanelTransactionLayout.createSequentialGroup()
                        .add(jButtonValiderTPA)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButtonValiderTAP, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanelTransactionLayout.setVerticalGroup(
            jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelTransactionLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabelPP)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPPPdt)
                    .add(jTextFieldPPPdt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPPCQ)
                    .add(jTextFieldPPCQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonValiderTPP))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPPAQ)
                    .add(jTextFieldPPAQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPA)
                    .add(jLabelTAP))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelTransactionLayout.createSequentialGroup()
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabelPAPdt)
                            .add(jTextFieldPAPdt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabelAPPC))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(jLabelPAC)
                            .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jTextFieldPAC, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jLabelAPCQ)
                                .add(jTextFieldAPCQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabelPAAQ)
                            .add(jTextFieldPAAQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabelAPAQ)
                            .add(jTextFieldAPAQ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(15, 15, 15)
                        .add(jPanelTransactionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jButtonValiderTPA)
                            .add(jButtonValiderTAP)))
                    .add(jTextFieldAPPC, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        jTabbedPane1.addTab("Transaction", jPanelTransaction);

        jLabel1.setText("Service de transactions vachement bien  secure : Copyright JBCM systems 2006 V20.19");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 462, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 462, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 287, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );
        pack();
    }// </editor-fold>                        

    private void jButtonValiderTAPActionPerformed(java.awt.event.ActionEvent evt) {                                                  
// TODO add your handling code here:
					String produitDemandeur = jTextFieldAPCQ.getText();
					Float montant = Float.parseFloat(jTextFieldAPPC.getText());
					String tiers = jTextFieldAPAQ.getText();
					garant.echangerProduitContreArgent(
							utilisateurCourant.nom, utilisateurCourant.motDePasse, tiers, produitDemandeur, montant, true);
    }                                                 

    private void jButtonValiderTPAActionPerformed(java.awt.event.ActionEvent evt) {                                                  
// TODO add your handling code here:
					String produitDemandeur = jTextFieldPAPdt.getText();
					Float montant = Float.parseFloat(jTextFieldPAC.getText());
					String tiers = jTextFieldPAAQ.getText();
					garant.echangerProduitContreArgent(
							utilisateurCourant.nom, utilisateurCourant.motDePasse, tiers, produitDemandeur, montant, false);
    }                                                 

    private void jButtonValiderTPPActionPerformed(java.awt.event.ActionEvent evt) {                                                  
// TODO add your handling code here:
					String produitDemandeur = jTextFieldPPPdt.getText();
					String produitTiers = jTextFieldPPCQ.getText();
					String tiers = jTextFieldPPAQ.getText();
					garant.echangerProduitContreProduit(
							utilisateurCourant.nom, utilisateurCourant.motDePasse, tiers, produitDemandeur, produitTiers);
    }                                                 

    private void jButtonStockDeActionPerformed(java.awt.event.ActionEvent evt) {                                               
// TODO add your handling code here:
        if (stock.consulterStock(jTextFieldStockDe.getText()).length > 0) {
            jListStockDe
                    .setModel(new javax.swing.AbstractListModel() {
                String[] strings = stock
                        .consulterStock(jTextFieldStockDe.getText());
                
                public int getSize() {
                    return strings.length;
                }
                
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
        }
        else{
            jListStockDe.setModel(new javax.swing.AbstractListModel() {
                String[] strings = {""};
                
                public int getSize() {
                    return strings.length;
                }
                
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
        }
    }                                              

    private void jButtonValiderAjouterProduitActionPerformed(java.awt.event.ActionEvent evt) {                                                             
// TODO add your handling code here:
        try {
            stock.ajouteProduit(jTextFieldAjouterProduit.getText(), utilisateurCourant.nom,
                    utilisateurCourant.motDePasse);
            if (stock.consulterStock(utilisateurCourant.nom).length > 0) {
                jListStock
                        .setModel(new javax.swing.AbstractListModel() {
                    String[] strings = stock
                            .consulterStock(utilisateurCourant.nom);
                    
                    public int getSize() {
                        return strings.length;
                    }
                    
                    public Object getElementAt(int i) {
                        return strings[i];
                    }
                });
            }
        } catch (MauvaisMotDePasse e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }                                                            

    private void jButtonMajStockActionPerformed(java.awt.event.ActionEvent evt) {                                                
// TODO add your handling code here:
        if (stock.consulterStock(utilisateurCourant.nom).length > 0) {
            jListStock
                    .setModel(new javax.swing.AbstractListModel() {
                String[] strings = stock
                        .consulterStock(utilisateurCourant.nom);
                
                public int getSize() {
                    return strings.length;
                }
                
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
        }
        else{
            jListStock.setModel(new javax.swing.AbstractListModel() {
                String[] strings = {""};
                
                public int getSize() {
                    return strings.length;
                }
                
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
        }
    }                                               

    private void jButtonMajSoldeCourantActionPerformed(java.awt.event.ActionEvent evt) {                                                       
// TODO add your handling code here:
        try {
            jTextFieldSoldeCourant.setText(""
                    + banque.consulterSolde(
                    utilisateurCourant.nom,
                    utilisateurCourant.motDePasse));
        } catch (MauvaisMotDePasse e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }                                                      

    private void jButtonValiderCrediterActionPerformed(java.awt.event.ActionEvent evt) {                                                       
// TODO add your handling code here:
        Float credit = Float.parseFloat(jTextFieldCrediter
                .getText());
        try {
            banque.crediterCompte(utilisateurCourant.nom,
                    utilisateurCourant.motDePasse, credit);
            jTextFieldSoldeCourant.setText(""
                    + banque.consulterSolde(
                    utilisateurCourant.nom,
                    utilisateurCourant.motDePasse));
        } catch (MauvaisMotDePasse e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }                                                      

    private void jButtonInscriptionActionPerformed(java.awt.event.ActionEvent evt) {                                                   
// TODO add your handling code here:
        String login = jTextFieldUtilisateur.getText();
        utilisateurCourant = new ParticipantImplGUI(login, this);
        try {
            utilisateurCourant.motDePasse = garant
                    .creerCompte(login);
            
            jTextFieldMdpG
                    .setText(utilisateurCourant.motDePasse);
            
            jTextFieldSoldeCourant.setText(""
                    + banque.consulterSolde(login,
                    utilisateurCourant.motDePasse));
            
            jButtonConnexion.setEnabled(false);
            jButtonInscription.setEnabled(false);
            
            enregistrerParticipant(utilisateurCourant);
        } catch (UtilisateurDejaExistant e) {
            JOptionPane.showMessageDialog(jPanelTransaction,
                    login + " est deja utilise, sorry!",
                    "Erreur login", JOptionPane.ERROR_MESSAGE);
        } catch (MauvaisMotDePasse ex) {
            ex.printStackTrace();
        }
    }                                                  

    private void jButtonConnexionActionPerformed(java.awt.event.ActionEvent evt) {                                                 
// TODO add your handling code here:
        String login = jTextFieldIdentifiant.getText();
        utilisateurCourant = new ParticipantImplGUI(login,this);
        String mdp = jTextFieldMdp.getText();
        utilisateurCourant.motDePasse = mdp;
        
        try {
            jTextFieldSoldeCourant.setText(""
                    + banque.consulterSolde(login, mdp));
            if (stock.consulterStock(login).length > 0) {
                jListStock
                        .setModel(new javax.swing.AbstractListModel() {
                    String[] strings = stock
                            .consulterStock(utilisateurCourant.nom);
                    
                    public int getSize() {
                        return strings.length;
                    }
                    
                    public Object getElementAt(int i) {
                        return strings[i];
                    }
                });
            }
            jButtonConnexion.setEnabled(false);
            jButtonInscription.setEnabled(false);
            enregistrerParticipant(utilisateurCourant);
        } catch (MauvaisMotDePasse e) {
            JOptionPane.showMessageDialog(jPanelTransaction,
                    "mauvais mot de passe!", "Erreur mot de passe",
                    JOptionPane.ERROR_MESSAGE);
        }
    }              
    
    private void jButtonAjoutMonStockActionPerformed(java.awt.event.ActionEvent evt) {                                                 
//    	 TODO add your handling code here:
    	jTextFieldPPPdt.setText(""+jListStock.getSelectedValue());
    	jTextFieldPAPdt.setText(""+jListStock.getSelectedValue());
    	    }
    
    private void jButtonAjoutPasMonStockActionPerformed(java.awt.event.ActionEvent evt) {                                                 
//   	 TODO add your handling code here:
    	jTextFieldAPAQ.setText(jTextFieldStockDe.getText());
    	jTextFieldAPCQ.setText(""+jListStockDe.getSelectedValue());
    	jTextFieldPPAQ.setText(jTextFieldStockDe.getText());
    	jTextFieldPPCQ.setText(""+jListStockDe.getSelectedValue());
    	jTextFieldPAAQ.setText(jTextFieldStockDe.getText());
    	
   	    }
    
    private static void enregistrerParticipant(ParticipantImplGUI utilisateur) {
		// TODO Auto-generated method stub
		/* Enregistrement de l'utilisateur dans le service de nommage */

		POA rootpoa;
		try {
			rootpoa = POAHelper.narrow(orb
					.resolve_initial_references("RootPOA"));
			rootpoa.the_POAManager().activate();
			NameComponent path[];
			org.omg.CORBA.Object refs = rootpoa
					.servant_to_reference(utilisateur);
			Participant pref = ParticipantHelper.narrow(refs);
                           path = ncRef.to_name(utilisateur.nom + "JBCM");
            
			ncRef.rebind(path, pref);
		} catch (InvalidName e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		/* Fin enregistrement */catch (AdapterInactive e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ServantNotActive e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (WrongPolicy e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NotFound e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (CannotProceed e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (org.omg.CosNaming.NamingContextPackage.InvalidName ex) {
                        ex.printStackTrace();
                }
	}
    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) 		throws org.omg.CORBA.ORBPackage.InvalidName,
			org.omg.CosNaming.NamingContextPackage.InvalidName {
		orb = org.omg.CORBA.ORB.init(args, null);
		// org.omg.CORBA.Object objRef;
		try {
			objRef = orb.resolve_initial_references("NameService");
			ncRef = NamingContextExtHelper.narrow(objRef);
			garant = GarantHelper.narrow(ncRef.resolve_str("GarantJBCM"));
			banque = BanqueHelper.narrow(ncRef.resolve_str("BanqueJBCM"));
			stock = StockHelper.narrow(ncRef.resolve_str("StockJBCM"));
		} catch (InvalidName e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NotFound e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (CannotProceed e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
                
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ClientGUI().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify                     
    private javax.swing.JButton jButtonAjoutMonStock;
    private javax.swing.JButton jButtonPasMonStock;
    private javax.swing.JButton jButtonConnexion;
    private javax.swing.JButton jButtonDeconnexion;
    private javax.swing.JButton jButtonInscription;
    private javax.swing.JButton jButtonMajSoldeCourant;
    private javax.swing.JButton jButtonMajStock;
    private javax.swing.JButton jButtonQuitter;
    private javax.swing.JButton jButtonStockDe;
    private javax.swing.JButton jButtonValiderAjouterProduit;
    private javax.swing.JButton jButtonValiderCrediter;
    private javax.swing.JButton jButtonValiderTAP;
    private javax.swing.JButton jButtonValiderTPA;
    private javax.swing.JButton jButtonValiderTPP;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabelAPAQ;
    private javax.swing.JLabel jLabelAPCQ;
    private javax.swing.JLabel jLabelAPPC;
    private javax.swing.JLabel jLabelAjouterProduit;
    private javax.swing.JLabel jLabelCrediter;
    private javax.swing.JLabel jLabelIdentifiant;
    private javax.swing.JLabel jLabelMdp;
    private javax.swing.JLabel jLabelMdpG;
    private javax.swing.JLabel jLabelPA;
    private javax.swing.JLabel jLabelPAAQ;
    private javax.swing.JLabel jLabelPAC;
    private javax.swing.JLabel jLabelPAPdt;
    private javax.swing.JLabel jLabelPP;
    private javax.swing.JLabel jLabelPPAQ;
    private javax.swing.JLabel jLabelPPCQ;
    private javax.swing.JLabel jLabelPPPdt;
    private javax.swing.JLabel jLabelSoldeCourant;
    private javax.swing.JLabel jLabelTAP;
    private javax.swing.JLabel jLabelUtilisateur;
    private javax.swing.JList jListStock;
    private javax.swing.JList jListStockDe;
    private javax.swing.JPanel jPanelCompte;
    private javax.swing.JPanel jPanelConnexion;
    private javax.swing.JPanel jPanelConnexionConnexion;
    private javax.swing.JPanel jPanelConnexionInscription;
    private javax.swing.JPanel jPanelStock;
    private javax.swing.JPanel jPanelTransaction;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextFieldAPAQ;
    private javax.swing.JTextField jTextFieldAPCQ;
    private javax.swing.JTextField jTextFieldAPPC;
    private javax.swing.JTextField jTextFieldAjouterProduit;
    private javax.swing.JTextField jTextFieldCrediter;
    private javax.swing.JTextField jTextFieldIdentifiant;
    private javax.swing.JTextField jTextFieldMdp;
    private javax.swing.JTextField jTextFieldMdpG;
    private javax.swing.JTextField jTextFieldPAAQ;
    private javax.swing.JTextField jTextFieldPAC;
    private javax.swing.JTextField jTextFieldPAPdt;
    private javax.swing.JTextField jTextFieldPPAQ;
    private javax.swing.JTextField jTextFieldPPCQ;
    private javax.swing.JTextField jTextFieldPPPdt;
    private javax.swing.JTextField jTextFieldSoldeCourant;
    private javax.swing.JTextField jTextFieldStockDe;
    private javax.swing.JTextField jTextFieldUtilisateur;
    // End of variables declaration                   
    
}
